{include file="header.html"}

<div class="page-header">
	<h6>
		提现申请
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			提现历史
		</small>
	</h6>
</div><!-- /.page-header -->

<form class="form-inline" action="?app=finance&act=apply" method="post">
<input type="hidden" name="price" value="{$can_price}" />
<h4>财务结算</h4>
<div style="line-height:25px;">
	当前时间：<span id="now">{$now}</span><br />
	未提现金额(元)：<font color="red">￥{number_format($total_price,2)}</font><br />
	可提现金额(元)：<font color="green">￥{number_format($can_price,2)}</font>　<font color="gray">*可提现金额结算至上周日</font>
</div>
<button type="submit" class="btn btn-info btn-sm" {if $can_price==0}disabled{/if}>
	<i class="ace-icon fa fa-check bigger-110"></i>申请提现
</button>
</form>

<table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:15px;">
	<thead>
		<tr>
			<th>ID</th>
			<th>申请时间</th>
			<th>提现金额</th>
			<th>审核时间</th>
			<th>提现结果</th>
			<th>原因</th>
		</tr>
	</thead>

	<tbody>
		{foreach from=$rs item=row name=row}
		<tr>
			<td>{$row.id}</td>
			<td>{$row.add_time}</td>
			<td>￥{number_format($row.price,2)}</td>
			<td>{if $row.audit_time}{$row.audit_time_str}{else}-{/if}</td>
			<td>
				{if $row.status=='0'}<font color="gray">等待审核</font>{/if}
				{if $row.status=='1'}<font color="blue">已结算</font>{/if}
				{if $row.status=='-1'}<font color="red">不通过</font>{/if}
			</td>
			<td>{if $row.memo!=''}<font color="gray">{$row.memo}</font>{else}-{/if}</td>
		</tr>
		{foreachelse}
		<tr bgcolor="white"><td colspan="13" height="50">暂无记录</td></tr>
		{/foreach}	
		
	</tbody>
</table>
	<div class="mypage" style="text-align:right">
			共 {$page.num_records} 个记录  {$page.current_page} / {$page.num_pages} 页  {$page.first_page} {$page.prev} {$page.nav} {$page.next} {$page.last_page}
	</div>

{include file="footer.html"}
<script>
var now = '{$now}';
$(function(){
	setInterval(function(){
		var date = now.DateAdd('s', 1);
		$('#now').html(date.formatDate());
		now = date;
	}, 1000);
});
</script>